Introduce input, output methods to FuncDSL#1197
Introduce input, output methods to FuncDSL#1197fjtirado merged 1 commit intoserverlessworkflow:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds DSL helpers to simplify enriching inputFrom(...) and outputAs(...) transformations with access to the root workflow input (WorkflowModel), addressing #1196 by reducing boilerplate when reading workflowContext.instanceData().input().
Changes:
- Added
FuncDSL.enriched(...)andFuncDSL.enrichedOutput(...)helper functions (including root-input-only variants). - Introduced
EnrichWithModelBiFunctionfunctional interface to support(typedValue, WorkflowModel)enrichment lambdas. - Added new integration-style tests and updated
impl/testMaven dependencies to compile/run them.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java |
Adds new enrichment helpers and their Javadocs. |
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/EnrichWithModelBiFunction.java |
New functional interface for enrichment with WorkflowModel. |
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java |
New tests covering enriched input/output scenarios. |
impl/test/pom.xml |
Adds test-scope dependencies required by the new tests. |
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/Step.java |
Minor formatting-only changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
ricardozanini
left a comment
There was a problem hiding this comment.
Looks good, but please consider renaming to enrich instead and fwiw: https://www.enterpriseintegrationpatterns.com/patterns/messaging/DataEnricher.html
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
...uent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/EnrichWithModelBiFunction.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
|
See my comment on the issue, I think the PR needs to be refactor accordingly |
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Outdated
Show resolved
Hide resolved
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/FuncDSLEnrichWithTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Show resolved
Hide resolved
ricardozanini
left a comment
There was a problem hiding this comment.
LGTM, there's just one minor comment from copilot that should be addressed.
There was a problem hiding this comment.
We should not include experimental dependencies into an impl module
Those two test should be moved to test folder on experimental-lambda
fjtirado
left a comment
There was a problem hiding this comment.
Move test to lambda module to avoid dependency between impl and experimental
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
|
Done @fjtirado |
This pull request add
inputandoutputmethods to DSL.Closes #1196